1. Field of the Invention
The present invention relates to systems and methods for performing queries on data stored in a database, and in particular to a method and system for providing access to an array-based data object to a client.
2. Description of the Related Art
Large-scale integrated database management systems provide an efficient, consistent, and secure means for storing and retrieving vast amounts of data. This ability to manage massive amounts of information has become a virtual necessity in business today.
At the same time, wider varieties of data are available for storage and retrieval. In particular, multimedia applications are being introduced and deployed for a wide range of business and entertainment purposes, including multimedia storage, retrieval, and content analysis. Properly managed, multimedia information technology can be used to solve a wide variety of business problems. In some cases, the data objects to be stored, retrieved, and manipulated are quite large. Such data objects include, for example binary large objects (BLOBs), character large objects (CLOBs), video, audio, images, and text.
By virtue of their sheer size, these large data objects can be difficult to manage. For example, to transfer a large data object from a database to a user can take a significant amount of time and consume a significant amount of available communication bandwidth. At the same time it is often the case that the user requesting the large data object is interested in obtaining access to only a small portion of the data object. For example, the user may be interested in obtaining access to only a portion of a very large map or only a small segment of a video program. What is needed is a system and method for efficiently providing large data objects and portions thereof to a requesting client.
To address the requirements described above, the present invention discloses a method, apparatus, and an article of manufacture for providing efficient access to an array-based data object from a client program.
The method comprises the steps of receiving a database query from a client; generating a first execution plan from the database query; transmitting at least a portion of the first execution plan to a data server; compiling a query result from the execution of the first execution plan; and transmitting the query result to the client on a first communication path wherein the query result comprises an identification for a master data object responsive to the database query and the master data object comprises an identification for a plurality of array-based objects associated with the master data object.
In one embodiment of the invention, the method further comprises the steps of receiving a request for the master data object, the request comprising the identification of the master data object and the client address; transmitting a second execution plan derived from the request for the master data object, and transmitting the master data object directly to the client via a second communication path.
In another embodiment of the invention, the method further comprises the steps of receiving a request for an array-based object, transmitting a third execution plan derived from the request and client address information to the data server, and transmitting the relevant array based objects to the client via the second communication path in a batch mode. Other embodiments of the invention include a program storage device tangibly embodying instructions for performing the method steps above on a computer or similar device, and an apparatus for performing the foregoing operations.
The above-described invention allows large data objects to be transferred from the data server to the client directly rather than through the query coordinator implemented in the database server, thus making the application more responsive. Further, the foregoing invention also allows the data to be transmitted on a second communication link of higher bandwidth. The above-described invention also provides a method for batching array object requests and array object messages to and from the client, thus reducing the need for multiple calls.